package pers.wensheng.patterns.creator_pattern.factory_pattern.simple_factory_and_config_file_pattern;

import pers.wensheng.patterns.creator_pattern.factory_pattern.simple_factory_and_config_file_pattern.entity.Coffee;

/**
 *  工厂加配置文件的方式 bean.properties
 *  这种方式是单例的
 */
public class Main {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        Coffee coffee = CoffeeFactory.createCoffee("american");
        Coffee coffee2 = CoffeeFactory.createCoffee("american");
        System.out.println(coffee);
        System.out.println(coffee2);
    }
}
